package br.com.medmark.bean;

import java.io.Serializable;

import javax.inject.Named;
import javax.servlet.http.HttpSession;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;
import javax.faces.context.FacesContext;

import br.com.medmark.model.hibernate.Clinica;
import br.com.medmark.model.hibernate.dao.ClinicaDAO;


@ManagedBean(name="beanClinica")
public class BeanClinica implements Serializable{
	
	/**
	 * 
	 */
	private static final long serialVersionUID = -1006648400356773499L;
	private HttpSession session; 
    private FacesContext facesContext;
	public BeanClinica() {
		// TODO Auto-generated constructor stub
	}
	
	public void logout(){
		facesContext = FacesContext.getCurrentInstance();
		session = (HttpSession) facesContext.getExternalContext().getSession(true);
		
		session.setAttribute("clinica", null);
	}
	
	
}
